<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Reranker Framework (ReFr): reranker::AbstractFileBackedFeatureExtractor Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Reranker Framework (ReFr)
   
   </div>
   <div id="projectbrief">Reranking framework for structure prediction and discriminative language modeling</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacereranker.html">reranker</a>      </li>
      <li class="navelem"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html">AbstractFileBackedFeatureExtractor</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">reranker::AbstractFileBackedFeatureExtractor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="reranker::AbstractFileBackedFeatureExtractor" --><!-- doxytag: inherits="reranker::FeatureExtractor" -->
<p>This class makes it easy for concrete subclasses to extract features based on input from a file.  
 <a href="classreranker_1_1_abstract_file_backed_feature_extractor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for reranker::AbstractFileBackedFeatureExtractor:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classreranker_1_1_abstract_file_backed_feature_extractor.png" usemap="#reranker::AbstractFileBackedFeatureExtractor_map" alt=""/>
  <map id="reranker::AbstractFileBackedFeatureExtractor_map" name="reranker::AbstractFileBackedFeatureExtractor_map">
<area href="classreranker_1_1_feature_extractor.html" title="An abstract base class/interface for all feature extractors." alt="reranker::FeatureExtractor" shape="rect" coords="141,56,413,80"/>
<area href="classreranker_1_1_factory_constructible.html" title="An interface to make it easier to implement Factory-constructible types by implementing both required..." alt="reranker::FactoryConstructible" shape="rect" coords="141,0,413,24"/>
<area href="classreranker_1_1_basic_file_backed_feature_extractor.html" title="A class to read one line at a time from a backing file, and tokenize that line based on whitespace..." alt="reranker::BasicFileBackedFeatureExtractor" shape="rect" coords="0,168,272,192"/>
<area href="classreranker_1_1_file_backed_loss_setter.html" title="A &ldquo;feature extractor&rdquo; that reads lines from a backing file, setting each candidate&rsquo;s loss via its Can..." alt="reranker::FileBackedLossSetter" shape="rect" coords="282,168,554,192"/>
<area href="classreranker_1_1_file_backed_ngram_feature_extractor.html" title="A class to read one line at a time from backing file, and tokenize that line based on whitespace..." alt="reranker::FileBackedNgramFeatureExtractor" shape="rect" coords="0,224,272,248"/>
</map>
 </div></div>

<p><a href="classreranker_1_1_abstract_file_backed_feature_extractor-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ae1a8ca499ceccbd96e595c5eed8162e5">AbstractFileBackedFeatureExtractor</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an instance.  <a href="#ae1a8ca499ceccbd96e595c5eed8162e5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#aabac653d0cbf2bcb372622919fdfa1ec">~AbstractFileBackedFeatureExtractor</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this instance.  <a href="#aabac653d0cbf2bcb372622919fdfa1ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a55f7c8c8ed682a6c5dfe8ee16f0657d1">RegisterInitializers</a> (<a class="el" href="classreranker_1_1_initializers.html">Initializers</a> &amp;initializers)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers the data member to be initialized when an instance of this class is constructed by a <a class="el" href="classreranker_1_1_factory.html">Factory</a>.  <a href="#a55f7c8c8ed682a6c5dfe8ee16f0657d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ac4c468a49a2916746069c03cb430237d">Init</a> (const <a class="el" href="classreranker_1_1_environment.html">Environment</a> *env, const string &amp;arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is guaranteed to be inokved by a <a class="el" href="classreranker_1_1_factory.html">Factory</a> after invoking the <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a55f7c8c8ed682a6c5dfe8ee16f0657d1">RegisterInitializers</a> method just after construction.  <a href="#ac4c468a49a2916746069c03cb430237d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a6c6d31af782109224da56bee01316523">Extract</a> (<a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;candidate, <a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; int, double &gt; &amp;features)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#afdbfa39e53be2006eebea77d5d1cc640">ExtractSymbolic</a> (<a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;candidate, <a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; string, double &gt; &amp;symbolic_features)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#aa156423a870877982dd9ceea36e0be54">Reset</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates to this instance that iteration over candidate sets on which features are being extracted has been reset.  <a href="#aa156423a870877982dd9ceea36e0be54"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#af0993c4d905f72381d188dd6322d4a3d">Extract</a> (<a class="el" href="classreranker_1_1_candidate_set.html">CandidateSet</a> &amp;candidate_set)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts features for all the candidates in the specified <a class="el" href="classreranker_1_1_candidate_set.html" title="A class to hold a set of candidates, either for training or test.">CandidateSet</a>.  <a href="#af0993c4d905f72381d188dd6322d4a3d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a885a1ac08d8da3701b6190ab5b320ea8">line_number</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current number of lines read by this feature extractor from the underlying stream.  <a href="#a885a1ac08d8da3701b6190ab5b320ea8"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ae2290c8c1b9dc467661285b553a4a6fd">ReadFromStream</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads from the stream.  <a href="#ae2290c8c1b9dc467661285b553a4a6fd"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ab1c642c4cc69753a5560aaf9a147750f">filename_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The name of the file backing this feature extractor.  <a href="#ab1c642c4cc69753a5560aaf9a147750f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">istream *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a2f47865429cf131a257ce11486482de8">is_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The stream created from the file backing this feature extractor.  <a href="#a2f47865429cf131a257ce11486482de8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a4149b3cfb999861c3fc3e49ac2a5c7ec">line_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The last line read by this feature extractor.  <a href="#a4149b3cfb999861c3fc3e49ac2a5c7ec"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a01976db120e6528a1bee91051bdf3fc2">line_number_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of lines read so far by this feature extractor.  <a href="#a01976db120e6528a1bee91051bdf3fc2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classreranker_1_1_tokenizer.html">Tokenizer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a23620d92e5fb8e73ca88da6eb65e1447">tokenizer_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple whitespace tokenizer for use by concrete subclasses.  <a href="#a23620d92e5fb8e73ca88da6eb65e1447"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This class makes it easy for concrete subclasses to extract features based on input from a file. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00057">57</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae1a8ca499ceccbd96e595c5eed8162e5"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::AbstractFileBackedFeatureExtractor" ref="ae1a8ca499ceccbd96e595c5eed8162e5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ae1a8ca499ceccbd96e595c5eed8162e5">reranker::AbstractFileBackedFeatureExtractor::AbstractFileBackedFeatureExtractor</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs an instance. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00060">60</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="aabac653d0cbf2bcb372622919fdfa1ec"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::~AbstractFileBackedFeatureExtractor" ref="aabac653d0cbf2bcb372622919fdfa1ec" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#aabac653d0cbf2bcb372622919fdfa1ec">reranker::AbstractFileBackedFeatureExtractor::~AbstractFileBackedFeatureExtractor</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroys this instance. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00063">63</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6c6d31af782109224da56bee01316523"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::Extract" ref="a6c6d31af782109224da56bee01316523" args="(Candidate &amp;candidate, FeatureVector&lt; int, double &gt; &amp;features)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a6c6d31af782109224da56bee01316523">reranker::AbstractFileBackedFeatureExtractor::Extract</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;&#160;</td>
          <td class="paramname"><em>candidate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; int, double &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Extracts features for the specified candidate, where each feature is represented by an int for its unique identifier. </p>
<dl class="user"><dt><b>Implementation advice:</b></dt><dd>Please play nice with others! For efficiency, the feature vector you are modifying is the actual feature vector inside the specified <a class="el" href="classreranker_1_1_candidate.html" title="A class to represent a candidate in a set of candidates that constitutes a training instance for a re...">Candidate</a>. Please use <a class="el" href="classreranker_1_1_feature_vector.html#a541f26184a4407f62eb5dad8102cf375" title="Increments the weight of the specified feature by the specified amount.">FeatureVector::IncrementWeight</a> wherever possible; only use <a class="el" href="classreranker_1_1_feature_vector.html#ad94d388ef81023981d6924a2020268d2" title="Sets the weight of the specified feature to the specified value.">FeatureVector::SetWeight</a> if you truly want to blow away any existing weight for a feature.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">candidate</td><td>the candidate for which to extract features </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">features</td><td>the features extracted for the specified candidate </td></tr>
  </table>
  </dd>
</dl>
 
<p>Implements <a class="el" href="classreranker_1_1_feature_extractor.html#af1c46248eb454384594dc3fcb61b0e70">reranker::FeatureExtractor</a>.</p>

<p>Implemented in <a class="el" href="classreranker_1_1_file_backed_ngram_feature_extractor.html#a2376e8f3a73cdac208c82189835c7c8d">reranker::FileBackedNgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#a1582a78931b69d33af342a1c075af4bd">reranker::FileBackedLossSetter</a>, and <a class="el" href="classreranker_1_1_basic_file_backed_feature_extractor.html#a5a42152a8957f32caef319d532f9de76">reranker::BasicFileBackedFeatureExtractor</a>.</p>

</div>
</div>
<a class="anchor" id="af0993c4d905f72381d188dd6322d4a3d"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::Extract" ref="af0993c4d905f72381d188dd6322d4a3d" args="(CandidateSet &amp;candidate_set)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a6c6d31af782109224da56bee01316523">reranker::AbstractFileBackedFeatureExtractor::Extract</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_candidate_set.html">CandidateSet</a> &amp;&#160;</td>
          <td class="paramname"><em>candidate_set</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extracts features for all the candidates in the specified <a class="el" href="classreranker_1_1_candidate_set.html" title="A class to hold a set of candidates, either for training or test.">CandidateSet</a>. </p>
<p>The default implementation here uses the concrete implementations of the <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a6c6d31af782109224da56bee01316523">Extract(Candidate&amp;,FeatureVector&lt;int,double&gt;&amp;)</a> and <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#afdbfa39e53be2006eebea77d5d1cc640">ExtractSymbolic</a> methods.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">candidate_set</td><td>the set of candidates for which to extract features. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classreranker_1_1_feature_extractor.html#ae7e30e3985d450909d7e70fc2c9658f2">reranker::FeatureExtractor</a>.</p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00127">127</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="afdbfa39e53be2006eebea77d5d1cc640"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::ExtractSymbolic" ref="afdbfa39e53be2006eebea77d5d1cc640" args="(Candidate &amp;candidate, FeatureVector&lt; string, double &gt; &amp;symbolic_features)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#afdbfa39e53be2006eebea77d5d1cc640">reranker::AbstractFileBackedFeatureExtractor::ExtractSymbolic</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;&#160;</td>
          <td class="paramname"><em>candidate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; string, double &gt; &amp;&#160;</td>
          <td class="paramname"><em>symbolic_features</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Extracts symbolic features for the specified candidate, where each feature is represented by a string for its unique identifier. </p>
<dl class="user"><dt><b>Implementation advice:</b></dt><dd>Please play nice with others! For efficiency, the feature vector you are modifying is the actual feature vector inside the specified <a class="el" href="classreranker_1_1_candidate.html" title="A class to represent a candidate in a set of candidates that constitutes a training instance for a re...">Candidate</a>. Please use <a class="el" href="classreranker_1_1_feature_vector.html#a541f26184a4407f62eb5dad8102cf375" title="Increments the weight of the specified feature by the specified amount.">FeatureVector::IncrementWeight</a> wherever possible; only use <a class="el" href="classreranker_1_1_feature_vector.html#ad94d388ef81023981d6924a2020268d2" title="Sets the weight of the specified feature to the specified value.">FeatureVector::SetWeight</a> if you truly want to blow away any existing weight for a feature.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">candidate</td><td>the candidate for which to extract features </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">symbolic_features</td><td>the features extracted for the specified candidate </td></tr>
  </table>
  </dd>
</dl>
 
<p>Implements <a class="el" href="classreranker_1_1_feature_extractor.html#aa35034d5100e4a2cbe83325cad6c4a6b">reranker::FeatureExtractor</a>.</p>

<p>Implemented in <a class="el" href="classreranker_1_1_file_backed_ngram_feature_extractor.html#a5d00f653c80bb8f502f7228a6c27c5d2">reranker::FileBackedNgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#ac5074ad24b993ea7c3735ddcf4627c03">reranker::FileBackedLossSetter</a>, and <a class="el" href="classreranker_1_1_basic_file_backed_feature_extractor.html#ad43d543b51470fbc0e6bbdbd16791c30">reranker::BasicFileBackedFeatureExtractor</a>.</p>

</div>
</div>
<a class="anchor" id="ac4c468a49a2916746069c03cb430237d"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::Init" ref="ac4c468a49a2916746069c03cb430237d" args="(const Environment *env, const string &amp;arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ac4c468a49a2916746069c03cb430237d">reranker::AbstractFileBackedFeatureExtractor::Init</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classreranker_1_1_environment.html">Environment</a> *&#160;</td>
          <td class="paramname"><em>env</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method is guaranteed to be inokved by a <a class="el" href="classreranker_1_1_factory.html">Factory</a> after invoking the <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a55f7c8c8ed682a6c5dfe8ee16f0657d1">RegisterInitializers</a> method just after construction. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">env</td><td>the environment just after initializing this object </td></tr>
    <tr><td class="paramname">arg</td><td>the string parsed by the <a class="el" href="classreranker_1_1_factory.html">Factory</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classreranker_1_1_factory.html#a68117013334b03c94fc525e62080311f" title="Dynamically creates an object, whose type and initialization are contained in a specification string...">Factory::CreateOrDie</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classreranker_1_1_factory_constructible.html#a5a323858b80346e85b3282ddba53d4ad">reranker::FactoryConstructible</a>.</p>

<p>Reimplemented in <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#a8f884761e0906e7abf630912af1ab70b">reranker::FileBackedLossSetter</a>.</p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00099">99</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a885a1ac08d8da3701b6190ab5b320ea8"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::line_number" ref="a885a1ac08d8da3701b6190ab5b320ea8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual long <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a885a1ac08d8da3701b6190ab5b320ea8">reranker::AbstractFileBackedFeatureExtractor::line_number</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current number of lines read by this feature extractor from the underlying stream. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00140">140</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="ae2290c8c1b9dc467661285b553a4a6fd"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::ReadFromStream" ref="ae2290c8c1b9dc467661285b553a4a6fd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ae2290c8c1b9dc467661285b553a4a6fd">reranker::AbstractFileBackedFeatureExtractor::ReadFromStream</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads from the stream. </p>
<p>The default implementation here reads a single line and puts it into the protected <code>line_</code> member. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00145">145</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a55f7c8c8ed682a6c5dfe8ee16f0657d1"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::RegisterInitializers" ref="a55f7c8c8ed682a6c5dfe8ee16f0657d1" args="(Initializers &amp;initializers)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a55f7c8c8ed682a6c5dfe8ee16f0657d1">reranker::AbstractFileBackedFeatureExtractor::RegisterInitializers</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_initializers.html">Initializers</a> &amp;&#160;</td>
          <td class="paramname"><em>initializers</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Registers the data member to be initialized when an instance of this class is constructed by a <a class="el" href="classreranker_1_1_factory.html">Factory</a>. </p>
<table class="doxtable">
<tr>
<th>Variable name </th><th>Type </th><th>Required </th><th>Description </th><th>Default value  </th></tr>
<tr>
<td><code>filename</code> </td><td><code>string</code> </td><td>Yes </td><td>The name of the file backing this feature extractor. </td><td>n/a  </td></tr>
</table>

<p>Reimplemented from <a class="el" href="classreranker_1_1_factory_constructible.html#a4a45cf0a7822b3cd26ec882f0330b788">reranker::FactoryConstructible</a>.</p>

<p>Reimplemented in <a class="el" href="classreranker_1_1_file_backed_ngram_feature_extractor.html#ae803956c36ce57c7f826f10714a2caf6">reranker::FileBackedNgramFeatureExtractor</a>, and <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#a85c5a0cff9de382353359b50d3f21e84">reranker::FileBackedLossSetter</a>.</p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00086">86</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="aa156423a870877982dd9ceea36e0be54"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::Reset" ref="aa156423a870877982dd9ceea36e0be54" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#aa156423a870877982dd9ceea36e0be54">reranker::AbstractFileBackedFeatureExtractor::Reset</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Indicates to this instance that iteration over candidate sets on which features are being extracted has been reset. </p>
<p>Concrete subclasses should override this method (which by default does nothing) if they need to do something special at the beginning of each iteration. </p>

<p>Reimplemented from <a class="el" href="classreranker_1_1_feature_extractor.html#aff5c63502be6a9e662d0db49a174a5f7">reranker::FeatureExtractor</a>.</p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00113">113</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ab1c642c4cc69753a5560aaf9a147750f"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::filename_" ref="ab1c642c4cc69753a5560aaf9a147750f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#ab1c642c4cc69753a5560aaf9a147750f">reranker::AbstractFileBackedFeatureExtractor::filename_</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The name of the file backing this feature extractor. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00160">160</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a2f47865429cf131a257ce11486482de8"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::is_" ref="a2f47865429cf131a257ce11486482de8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">istream* <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a2f47865429cf131a257ce11486482de8">reranker::AbstractFileBackedFeatureExtractor::is_</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The stream created from the file backing this feature extractor. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00162">162</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a4149b3cfb999861c3fc3e49ac2a5c7ec"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::line_" ref="a4149b3cfb999861c3fc3e49ac2a5c7ec" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a4149b3cfb999861c3fc3e49ac2a5c7ec">reranker::AbstractFileBackedFeatureExtractor::line_</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The last line read by this feature extractor. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00164">164</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a01976db120e6528a1bee91051bdf3fc2"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::line_number_" ref="a01976db120e6528a1bee91051bdf3fc2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a01976db120e6528a1bee91051bdf3fc2">reranker::AbstractFileBackedFeatureExtractor::line_number_</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The number of lines read so far by this feature extractor. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00166">166</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a23620d92e5fb8e73ca88da6eb65e1447"></a><!-- doxytag: member="reranker::AbstractFileBackedFeatureExtractor::tokenizer_" ref="a23620d92e5fb8e73ca88da6eb65e1447" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classreranker_1_1_tokenizer.html">Tokenizer</a> <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a23620d92e5fb8e73ca88da6eb65e1447">reranker::AbstractFileBackedFeatureExtractor::tokenizer_</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A simple whitespace tokenizer for use by concrete subclasses. </p>

<p>Definition at line <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html#l00168">168</a> of file <a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="abstract-file-backed-feature-extractor_8_h_source.html">abstract-file-backed-feature-extractor.H</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 7 2014 15:24:58 for Reranker Framework (ReFr) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
